/**
 * @(#)WeiboUserServiceImpl.java 2017年2月21日
 * Copyright(C) 2017 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.jsbd.boss.dao.IMiguProvinceConfigDao;
import org.jsbd.boss.domian.channel.ClientEffectVo;
import org.jsbd.boss.domian.channel.MiguProvince;
import org.jsbd.boss.domian.channel.MiguUser;
import org.jsbd.boss.domian.channel.ThirdUserQueryVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import edu.hziee.common.queue.DelayExecuteBuffer;

/**
 * 自有咪咕账号
 * 
 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
 * @version 1.0.0
 */
// @Service("inSixMiguUserService")
public class InSixMonthMiguUserServiceImpl
// extends ThirdLoginAdapterHandler<MiguUser>
{

	public static final Logger LOGGER = LoggerFactory.getLogger(InSixMonthMiguUserServiceImpl.class);

	@Resource
	private IMiguProvinceConfigDao miguProvinceConfigDao;

	@Resource
	private DelayExecuteBuffer<ClientEffectVo> miguEffectDelBuffer;

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.jsbd.boss.service.impl.AbsThirdUserServiceImpl#init()
	 */
	// @Override
	public boolean init() {
		// loginIndexKey = CacheKey.SIX_MONTH_MIGU_USR_APK;
		// loginType = LoginTypeEnum.SIX_MONTH_MIGU;
		// queueKey = CacheKey.SIX_MIGU_USER_QUEUE;
		return true;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.jsbd.boss.service.impl.AbsThirdUserServiceImpl#selectUserList(org
	 * .jsbd.boss.domian.channel.ThirdUserQueryVo)
	 */
	// @Override
	public List<MiguUser> selectUserList(ThirdUserQueryVo queryVo) {
		// LoginTypeEnum loginTypeOfMigu = queryVo.getLoginType();
		// 咪咕登录省份限制
		List<MiguUser> userList = null;
		List<MiguProvince> provinceList = miguProvinceConfigDao.selectMiguProvinceConfigList(null);
		if (provinceList != null && provinceList.size() > 0) {
			for (MiguProvince province : provinceList) {
				if (province.getProvinceId().intValue() == queryVo.getProvinceId().intValue()) {// 如果配置了省份才可以做
					// if(loginTypeOfMigu == LoginTypeEnum.MIGU){
					// userList = miguUserDAO.selectUserList(queryVo.getStart(),
					// queryVo.getProvinceId(), queryVo.getLength(), 1);
					// }else if(loginTypeOfMigu == LoginTypeEnum.SELF_MIGU){
					// userList = selfMiguUserDAO.selectUserList(queryVo.getStart(),
					// queryVo.getProvinceId(), queryVo.getLength(), 1);
					// }else if(loginTypeOfMigu == LoginTypeEnum.THIRD_MIGU){
					// userList = thirdMiguUserDao.selectUserList(queryVo.getStart(),
					// queryVo.getProvinceId(), queryVo.getLength(), 1);
					// }
					// userList = miguUserDAO.selectSixUserList(queryVo.getStart(),
					// queryVo.getLength());
				}
			}
		}
		return userList;
	}

}
